<?phpnamespace App\Repositories\Api;use App\Repositories\PictureMappingRepository;use App\Models\Banner;use Cache;class BannerRepository{    public function getBannerByName($name = "") {        $cache_key = 'banner_' . $name;        // env("OPEN_CACHE") &&        if( env("OPEN_CACHE") && $result = Cache::get($cache_key)) {            return $result;        }        $res = Banner::where(['name' => $name])->first();        if(!$res) return NULL;        $result = (new PictureMappingRepository())->getMappingBySearch([                'object_id' =>  $res['id'],                'object_type'   => "banner"            ]);        Cache::set($cache_key, $result);        return $result;    }}